#ifndef LOGICINTERFACEVME_H
#define LOGICINTERFACEVME_H

#include <stdint.h>
#include "LogicPool/LogicInterface.h"
#include "VmeModule.h"


class LogicInterfaceVME : public LogicInterface, public VmeModule 
{

protected:

	uint32_t lbaddress;
    uint32_t lb_high_adr_cache;
    
public:

    LogicInterfaceVME(int handle, int address) : VmeModule(handle, address) {};

	virtual void Open();
	virtual void Close();

	virtual void Reset();
	virtual uint32_t GetID();
	virtual void SetAddress(uint8_t type, uint8_t number, uint8_t addr);
	virtual void SetShortAddress(uint8_t number, uint8_t addr);

	virtual uint8_t ReadByte();
	virtual void WriteByte(uint8_t data);

	virtual uint16_t ReadWord();
	virtual void ReadWordFIFO(uint16_t * data, uint16_t n);
	virtual void WriteWord(uint16_t data);

	virtual uint32_t ReadLong();
	virtual void WriteLong(uint32_t data);
};


#endif
